home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Hyper / Hy-Hyperi / HyperBBS 2.0.sit / HyperBBS 2.0 / User Help / stack_-1.xml < prev   
Encoding:
Extensible Markup Language  |  1992-07-14  |  8.5 KB  |  35 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>16</cardCount>
  7.     <cardID>3003</cardID>
  8.     <listID>12023</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- on openStack
  17. -- push recent card
  18. -- pass openStack
  19. -- end openStack
  20.  
  21.  
  22. --   -- this is the section that should apear in each section's stack!
  23.  
  24.  
  25. -- Open/init card code:
  26.  
  27. -- Override to do local initialization (remember to pass if approp.).
  28. on openCard
  29. global doingBackFields, nextFieldNum, onLine, crcFlg
  30. global lookingFor
  31. put empty into lookingFor
  32. set cursor to 4
  33. set lockScreen to true
  34. send initFields to this card
  35. set lockScreen to false
  36. if onLine then
  37. sendString return & return
  38. get short name of this card
  39. if (word 1 of it <> "card") or (word 2 of it <> "id") then
  40. if it is not empty then sendString it & return
  41. end if
  42. repeat with i = 1 to the number of fields
  43. get the lockText of field i
  44. if isEditable(name of field i) and (not it) then
  45. next repeat
  46. end if
  47. if not the visible of field i then next repeat
  48. put short name of field i into n
  49. if (word 1 of n is not "Bkgnd") or ¬¨
  50. (word 2 of n is not "field") or (word 3 of n is not "id") then
  51. get isLong("field " & i)
  52. if it then get n & ":" & return
  53. else get n & ": "
  54. else get empty
  55. if sendWithAbort(it & field i) then
  56. send abortOC
  57. exit openCard
  58. end if
  59. end repeat
  60. repeat with i = 1 to the number of card fields
  61. get the lockText of card field i
  62. if isEditable(name of card field i) and (not it) then next repeat
  63. if not the visible of card field i then next repeat
  64. put short name of card field i into n
  65. if (word 1 of n is not "card") or ¬¨
  66. (word 2 of n is not "field") or (word 3 of n is not "id") then
  67. get isLong("card field " & i)
  68. if it then get n & ":" & return
  69. else get n & ": "
  70. else get empty
  71. if sendWithAbort(it & card field i) then
  72. send abortOC
  73. exit openCard
  74. end if
  75. end repeat
  76. if crcFlg then disCRC
  77. flushInput
  78. end if
  79. put true into doingBackFields
  80. put 1 into nextFieldNum
  81. set cursor to 0
  82. end openCard
  83.  
  84. -- incase of abort
  85. on abortOC
  86. flushInput
  87. put true into doingBackFields
  88. put 1 into nextFieldNum
  89. set cursor to 0
  90. end abortOC
  91.  
  92. on initFields
  93. global initFs
  94. if initFs then
  95. repeat with i = 1 to the number of fields
  96. if isEditable(name of field i) then put empty into field i
  97. end repeat
  98. repeat with i = 1 to the number of card fields
  99. if isEditable(name of card field i) then put empty into card field i
  100. end repeat
  101. end if
  102. end initFields
  103.  
  104. on displayFields
  105. end displayFields
  106.  
  107. on disCRC
  108. put 0 into theCRC
  109. repeat with i = 1 to the number of fields
  110. get the lockText of field i
  111. if isEditable(name of field i) and (not it) then next repeat
  112. if not the visible of field i then next repeat
  113. put stringCRC(theCRC,field i) into theCRC
  114. end repeat
  115. repeat with i = 1 to the number of card fields
  116. get the lockText of card field i
  117. if isEditable(name of card field i) and (not it) then next repeat
  118. if not the visible of card field i then next repeat
  119. put stringCRC(theCRC,card field i) into theCRC
  120. end repeat
  121. sendString return & ".C=" & theCRC & return
  122. end disCRC
  123.  
  124. -- Send text code:
  125.  
  126. on sendString string
  127. global onLine
  128. if onLine then
  129. resetTimer
  130. sendSPort string
  131. end if
  132. end sendString
  133.  
  134. on sendVanilla string
  135. global onLine
  136. if onLine then
  137. resetTimer
  138. configureSPort linefeedOff
  139. sendSPort string
  140. configureSPort linefeedOn
  141. end if
  142. end sendVanilla
  143.  
  144. -- Field type testing code:
  145.  
  146. function isEditable f
  147. get the script of f
  148. if "-" & "- editable" is in it then return true
  149. else return false
  150. end isEditable
  151.  
  152. function isLong f
  153. get the script of f
  154. if "-" & "- long" is in it then return true
  155. else return false
  156. end isLong
  157.  
  158. function isInvisible f
  159. get the script of f
  160. if "-" & "- invisible" is in it then return true
  161. else return false
  162. end isInvisible
  163.  
  164. on stopNow
  165. global sysTOVal
  166. put charsAvailable() into charCnt
  167. if charCnt is not zero then
  168. put recvChars(charCnt) into incoming
  169. if (numToChar(19) is in incoming) then
  170. flushInput
  171. put the secs into was
  172. repeat while charsAvailable() is zero
  173. if the secs > (was + sysTOVal) then exit repeat
  174. end repeat
  175. flushinput
  176. end if
  177. end if
  178. end stopNow
  179.  
  180. function sendWithAbort theText
  181. global sendAborted, sysTOVal
  182. get theText
  183. repeat with i = 1 to the number of lines in it
  184. sendString line i of it & return
  185. put charsAvailable() into charCnt
  186. if charCnt is not zero then
  187. put recvChars(charCnt) into incoming
  188. if (numToChar(3) is in incoming) or ¬¨
  189. (numToChar(15) is in incoming) or ¬¨
  190. (numToChar(24) is in incoming) then
  191. put true into sendAborted
  192. return true
  193. exit sendWithAbort
  194. else
  195. if (numToChar(19) is in incoming) then
  196. flushInput
  197. put the secs into was
  198. repeat while charsAvailable() is zero
  199. if the secs > (was + sysTOVal) then exit repeat
  200. end repeat
  201. flushinput
  202. end if
  203. end if
  204. end if
  205. end repeat
  206. return false
  207. end sendWithAbort
  208.  
  209. on promptField
  210. put short name of the target into n
  211. get word 1 of n
  212. if (it is "card") or (it is "Bkgnd") then
  213. get (word 2 of n is not "field") or (word 3 of n is not "id")
  214. else get true
  215. if it then
  216. if isLong(the target) then put ":" & return after n
  217. else put ": " after n
  218. sendString n
  219. end if
  220. end promptField
  221.  
  222. on lookingForNothing
  223. global doingBackFields, nextFieldNum
  224. if doingBackFields then
  225. repeat
  226. if nextFieldNum > the number of fields then exit repeat
  227. put nextFieldNum into i
  228. add 1 to nextFieldNum
  229. get the lockText of field i
  230. if (not isEditable(name of field i)) or it then next repeat
  231. if not the visible of field i then next repeat
  232. put empty into field i
  233. send promptField to field i
  234. if isLong(name of field i) then
  235. sendString "[End with a period (.) on a line by itself]" & return
  236. fillField name of field i,false,isInvisible(name of field i)
  237. else fillField name of field i,true,isInvisible(name of field i)
  238. exit lookingForNothing
  239. end repeat
  240. put false into doingBackFields
  241. put 1 into nextFieldNum
  242. end if
  243. repeat
  244. if nextFieldNum > the number of card fields then exit repeat
  245. put nextFieldNum into i
  246. add 1 to nextFieldNum
  247. get the lockText of card field i
  248. if (not isEditable(name of card field i)) or it then next repeat
  249. if not the visible of card field i then next repeat
  250. put empty into card field i
  251. send promptField to card field i
  252. if isLong(name of card field i) then
  253. sendString "[End with a period (.) on a line by itself]" & return
  254. fillField name of card field i,false,¬¨
  255. isInvisible(name of card field i)
  256. else fillField name of card field i,true,¬¨
  257. isInvisible(name of card field i)
  258. exit lookingForNothing
  259. end repeat
  260. send cardFilled to this card
  261. end lookingForNothing
  262.  
  263. -- Button related code:
  264. on displayButtons
  265. global onLine, errorCount
  266. if onLine then
  267. flushInput
  268. put empty into text
  269. get ">> "
  270. repeat with i = 1 to the number of background buttons
  271. if not the visible of background button i then next repeat
  272. put it & short name of background button i after text
  273. get ", "
  274. end repeat
  275. repeat with i = 1 to the number of buttons
  276. if not the visible of button i then next repeat
  277. put it & short name of button i after text
  278. get ", "
  279. end repeat
  280. if it is ", " then
  281. sendString text & ": "
  282. put 0 into errorCount
  283. lookFor "singleChar","pushButton"
  284. else send noButtons to this card
  285. end if
  286. end displayButtons
  287.  
  288. on cardFilled
  289. send displayButtons to this card
  290. end cardFilled
  291.  
  292. --  --                   -- end of stuff to put in every stack
  293.  
  294. </script>
  295.     <background id="2642" file="background_2642.xml" name="" />
  296.     <card id="3003" file="card_3003.xml" marked="false" name="" owner="2642" />
  297.     <card id="3724" file="card_3724.xml" marked="false" name="" owner="2642" />
  298.     <card id="4069" file="card_4069.xml" marked="false" name="" owner="2642" />
  299.     <card id="4254" file="card_4254.xml" marked="false" name="" owner="2642" />
  300.     <card id="4434" file="card_4434.xml" marked="false" name="" owner="2642" />
  301.     <card id="3322" file="card_3322.xml" marked="false" name="" owner="2642" />
  302.     <card id="4764" file="card_4764.xml" marked="false" name="" owner="2642" />
  303.     <card id="5021" file="card_5021.xml" marked="false" name="" owner="2642" />
  304.     <card id="5479" file="card_5479.xml" marked="false" name="" owner="2642" />
  305.     <card id="5757" file="card_5757.xml" marked="false" name="" owner="2642" />
  306.     <card id="2412" file="card_2412.xml" marked="false" name="" owner="2642" />
  307.     <card id="6812" file="card_6812.xml" marked="false" name="" owner="2642" />
  308.     <card id="5929" file="card_5929.xml" marked="false" name="" owner="2642" />
  309.     <card id="6195" file="card_6195.xml" marked="false" name="" owner="2642" />
  310.     <card id="6466" file="card_6466.xml" marked="false" name="" owner="2642" />
  311.     <card id="3437" file="card_3437.xml" marked="false" name="" owner="2642" />
  312. </stack>
  313.